﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OnLineExam.Web.mag.Handler
{
    /// <summary>
    /// PaperHandler 的摘要说明
    /// </summary>
    public class PaperListHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string type = context.Request.Params["type"];
            if (string.IsNullOrEmpty(type))
                type = "getlist";

            var ID = context.Request.QueryString["ID"];

            OnLineExam.BLL.PaperManager bll = new OnLineExam.BLL.PaperManager();

            #region 获取列表

            

            string depid = context.Request.Params["depid"];
          

            //var loginuser=new UserManager().GetModel(context.User.Identity.Name);
            var ds = bll.GetList("depid=" + depid);
            int RecordCount = ds.Tables[0].Rows.Count;
            context.Response.Write(HHG.Common.Json.DataTable2Json(ds.Tables[0], RecordCount));
            #endregion
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}